function modalOpen (options) {
    var defaults = {
        id: null,
        title: '系统窗口',
        width: "100px",
        height: "100px",
        url: '',
        shade: 0.3,
//        btn: ['关闭'],
        btnclass: ['btn btn-primary', 'btn btn-danger'],
        callBack: null
    };
    var options = $.extend(defaults, options);
    var _width = top.$(window).width() > parseInt(options.width.replace('px', '')) ? options.width : top.$(window).width() + 'px';
    var _height = top.$(window).height() > parseInt(options.height.replace('px', '')) ? options.height : top.$(window).height() + 'px';
    layer.open({
        id: options.id,
        type: 2,
        shade: options.shade,
        title: options.title,
        fix: false,
        area: [_width, _height],
        content: options.url,
        btn: options.btn,
        btnclass: options.btnclass,
        cancel: function () {
            return true;
        }
    });
}

/**消息提示框 */
function modalMsg (content, type) {
   var iconType = 0;
   if (type != undefined) {
       var icon = "";
       if (type == 'success') {
           icon = "fa-check-circle";
           iconType = 1;
       }
       if (type == 'error') {
           icon = "fa-times-circle";
           iconType = 2;
       }
       if (type == 'warning') {
           icon = "fa-exclamation-circle";
           iconType = 3;
       }
       top.layer.msg(content, { icon: iconType, time: 3000, shift: 5 });
       top.$(".layui-layer-msg").find('i.' + iconType).parents('.layui-layer-msg').addClass('layui-layer-msg-' + type);
   } else {
       top.layer.msg(content);
   }
}